// components/songs-item/index.js
import {songDetail} from "../../service/api_music"
import {store} from "../../store/index"
Component({
    /**
     * 组件的属性列表
     */
    properties: {
          songs:{
              type:Object,
              value:{}
          },
          index:{
              type:Number,
              value:0
          }
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        handelSongClick(){
            wx.navigateTo({
              url: '../../pages/music-player/index?id='+this.data.songs.id,
            })
           store.dispatch("playMusicWithSongIdAction", { id:this.data.songs.id })
        }
    }
})
